<include file="Public:headersmall"/>
<style>
.center{width:1000px;margin:0 auto;margin-top:10px}
.left{width:160px;border:1px solid #dddddd;float:left;}
.main{width:830px;float:right;}
.title2{display:block;background:#317ee7;color:#fff;text-align:left;font-size:16px;height:25px;line-height:25px}
.left dl{display:block;background:#fff;font-size:13px;height:25px;line-height:25px}
.help{margin-top:5px}

.goods a{color:#0066CC}
.total_money{font-weight:bold;color:#333333;margin-top:10px}
.dly_money{color:#999999}
.dly_money:hover{color:#ffba00}
.nopay{font-weight:bold;color:#FF0000;margin-top:10px}
.nopay a{color:#FF0000}
.noship{font-weight:bold;color:#0066FF;margin-top:10px}
.shipping{font-weight:bold;color:#0066FF;margin-top:10px}

.order td{border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;border-bottom-color:#E6E6E6}
.order_list{border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px}
.title{background-color:#F3F3F3;height:20px}
.order_list img{height:50px;width:50px}


.index_page{width:840px;margin:0 auto;float:right;margin-top:10px;color:#0066CC;cursor:pointer;}
.page{height:20px;width:20px;border:1px solid #FF5500; text-align:center;vertical-align:middle;display:inline-block;color:#0066CC;cursor:pointer;}
.page:hover{color:#0066CC}
.page_current{height:20px;width:20px;border:1px solid #FF5500; text-align:center;vertical-align:middle;color:#FF0000;font-weight:bold;background:#FFEEE5;display:inline-block;}

.recomment{position:relative;width:830px;margin:20px auto;height:230px;overflow:hidden;float:right;border:1px solid #e6e6e6}
/* limit-buy-hd */
.limit-buy-hd{position:relative;height:37px;background:#f8f8f8 url(__APP__/statics/recomment/title.gif) no-repeat 80px 0;border-bottom:1px solid #e6e6e6;line-height:37px}
.limit-buy-hd h2{float:left;overflow:hidden;display:inline;width:85px;font-size:14px;padding:0 0 0 10px;}
/* limit-buy-nav */
.limit-buy-nav{float:right;width:60px;margin:7px 10px 0 0}
.limit-buy-nav span{float:left;width:44px;height:21px;font-size:14px;line-height:21px;text-align:center}
.limit-buy-nav em{margin-right:1px;color:#ea5501;font-weight:700}
.limit-buy-nav .prev,.limit-buy-nav .next{float:left;overflow:hidden;width:8px;height:9px;margin:6px 0 0;background:url(__APP__/statics/recomment/arrowbg.png) no-repeat -40px -60px}
.limit-buy-nav .next{background-position:-52px -180px}
/* limit-buy-bd */
.limit-buy-bd{overflow:hidden;position:absolute;top:38px;left:0;width:9000px;z-index:1}
/* btn-prev */
.btn-prev,.btn-next{overflow:hidden;position:absolute;display:none;top:93px;width:27px;height:48px;background:url(__APP__/statics/recomment/arrowbg.png) no-repeat 0 -60px;z-index:10}
.btn-prev{left:0}
.btn-next{right:0;background-position:-40px -60px}
.btn-prev:hover{background-position:0 -60px}
.btn-prev:active{background-position:0 -120px}
.btn-next:hover{background-position:-40px -60px}
.btn-next:active{background-position:-40px -120px}
/* products */
.products{float:left;width:831px;text-align:center;}
.products li{float:left;position:relative;width:164px;height:180px;padding:10px 15px 0;margin-left:7px}
.products li .pic{overflow:hidden;position:relative;width:120px;height:120px;margin:0 auto 4px;border:1px solid #dddddd;padding:5px}
.products li .pic img{width:120px;height:120px}
.products li .price{position:absolute;top:107px;right:15px;background:url(__APP__/statics/recomment/pricebg.gif) no-repeat;padding:6px 0 0 8px;width:74px;height:26px;line-height:26px;font-size:14px;font-weight:800;color:#fff;text-align:center}
.products li .name{overflow:hidden;height:36px;margin:0 0 2px;line-height:18px;text-align:center}
</style>
<div class="center">您的位置：<a href="__APP__">首页</a>-><a href="__GROUP__/Member"><font color="#317ee7">会员中心</font></a></div>
<div class="center">
   <div class="left">
     <include file="left"/>
   </div>

   <div class="main">
   <!--订单列表-->
   <div class="order">
         <table border="0" width="830" style="border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" height="27">
		<tr style="background:url(__APP__/statics/bg009.gif)">
			<td width="70" align="center">图片</td>
			<td width="225" align="left">商品</td>
			<td width="120" align="center">单价</td>
			<td width="60" align="center">数量</td>
			<td width="50" align="center">服务</td>
			<td width="120" align="center">订单金额</td>
			<td width="91" align="center">当前状态</td>
			<td align="right">
			<select size="1" name="status" id="status">
			  <option value="0">全部订单</option>
			  <option value="1">待付款</option>
			  <option value="2">已发货</option>
			  <option value="3">退货中</option>
			  <option value="4">退款中</option>
			  <option value="5">订单完成</option>
	       </select>
		   <input type="text" id="curent" value="{$status}" style="display:none">
	       </td>
		</tr>
		</table>
	  </div>

<volist name="order" id="order">
	      <div class="order">
		        <table border="1" width="830" style="border-collapse: collapse" bordercolor="#E6E6E6" cellpadding="5">
				<tr><td colspan="4" class="title">&nbsp;
				订单编号：{$order.order_id}&nbsp;&nbsp;
				创建时间：{$order.create_time|date="Y-m-d h:i:s",###}</td></tr>
				<tr>
					<td width="510">
						<table border="0" width="510">
					<volist name="order[item]" id="item">
						<tr>
							<td width="60" class="order_list">
							<if condition="$item.s_pic neq ''"><img src="__APP__/{$item.s_pic}" />
							<else/><img src="__APP__/statics/none.gif" /></if>
							</td>
							<td width="190" class="order_list"><span class="goods"><a href="{:U('Goods/item?id='.$item['goods_id'])}" target="_blank">{$item.name}</a></span></td>
							<td width="60" class="order_list" align="center">{$item.price}</div></td>
							<td width="80" class="order_list" align="center">{$item.num}</td>
							<td class="order_list" align="center">　</td>
						</tr>
					</volist>
						</table>
					</td>
					<td width="107" align="center" valign=top><div class="total_money">{$order.final_money}</div><span class="dly_money">(含运费:{$order.dly_money})</span></td>
					<td width="91" align="center" valign=top>
<if condition="($order.pay_status eq 0) AND ($order.ship_status eq 0) AND ($order.status eq 'active')">
<div class="nopay"><a href="{:U('Pay/ready?order='.$order['order_id'])}" target="_blank">等待付款</a></div>
<elseif condition="($order.pay_status eq 1) AND ($order.ship_status eq 0) AND ($order.is_delivery eq 'true') AND ($order.status eq 'active')" />
<div class="noship">等待发货</div>
<elseif condition="($order.pay_status eq 1) AND ($order.ship_status eq 0) AND ($order.is_delivery eq 'false') AND ($order.status eq 'active')" />
<div class="nopay">待上门取货</div>
<elseif condition="($order.pay_status eq 0) AND ($order.ship_status eq 1) AND ($order.is_onlinpay eq 'false') AND ($order.status eq 'active')" />
<div class="shipping">已发货</div><span class="dly_money">（货到付款）</span>
<elseif condition="($order.pay_status eq 1) AND ($order.ship_status eq 1) AND ($order.status eq 'active')" />
<div class="shipping">已发货</div><a href="javascript:viewShip({$order.order_id})"><span class="dly_money">(配送信息)</span></a>
<elseif condition="($order.pay_status eq 1) AND ($order.ship_status eq 2) AND ($order.status eq 'active')" />
<div class="nopay">退货中</div>
<elseif condition="($order.pay_status eq 2) AND ($order.ship_status eq 3) AND ($order.status eq 'active')" />
<div class="nopay">退款中</div>
<elseif condition="($order.pay_status eq 3) AND ($order.ship_status eq 3)" />
<div class="noship">已退款</div>
<elseif condition="$order.status eq 'dead'" />
<div class="nopay">订单已取消</div>
<elseif condition="$order.status eq 'finish'" />
<div class="nopay"><font color="green">交易成功</font></div><a href="javascript:viewShip({$order.order_id})"><span class="dly_money">(配送信息)</span></a>
</if>
					</td>
					<td width="79" align="center" valign=top>
<if condition="($order.pay_status eq 0) AND ($order.ship_status eq 0) AND ($order.is_onlinpay eq 'true') AND ($order.status eq 'active')">
<div class="nopay"><a href="{:U('Pay/ready?order='.$order['order_id'])}" target="_blank"><img src="__APP__/statics/pay.gif"/></a></div>
<elseif condition="($order.pay_status eq 0) AND ($order.ship_status eq 0) AND ($order.is_onlinpay eq 'false') "/>
<div class="nopay"><img src="__APP__/statics/huodao.gif"/></div>
</if>
<if condition="($order.status eq 'finish') AND ($order.finish_comm eq '0')">
<a href="__GROUP__/Goods/goodComm/?order={$order.order_id}"><div style="margin-top:10px;color:#317ee7;font-weight:bold">评价</div></a>
<elseif condition="($order.status eq 'finish') AND ($order.finish_comm eq '1')"/>
<div style="margin-top:10px;color:#999999">已评价</div>
</if>
                    </td>
				</tr>
				</table>
		  </div>
</volist>
<if condition="$order eq ''">
        <div style="width:300px;margin:0 auto;margin-top:50px;font-size:13px">您还没有购买过商品呦！<a href="__APP__"><font color="#317ee7">立刻购买</font></a></div>
</if>
        <div class="index_page"><div style="width:600px;margin:0 auto;float:right">{$page}</div></div>
        </div>


		<div class="recomment" id="J-lb">
			<div class="limit-buy-hd">
				<h2>猜您喜欢</h2>
				<div class="limit-buy-nav" id="J-lbn">
					<a href="javascript:void(0)" class="prev"></a>
					<span>
						<em id="J-lbcp">1</em>/4
					</span>
					<a href="javascript:void(0)" class="next"></a>
				</div>
			</div>

			<a href="javascript:void(0);" class="btn-prev"></a>
			
			<div class="limit-buy-bd" id="limit-buy">
			
				<ul class="products">
<volist name="goods_hot" id="goods_hot">
					<li>
						<p class="pic"><a href="__APP__/item/{$goods_hot.goods_id}.html" target="_blank"><img src="__APP__/{$goods_hot.m_pic}" alt="{$goods_hot.goods_name}"/></a></p>
						<p class="name"><a href="__APP__/item/{$goods_hot.goods_id}.html" target="_blank">{$goods_hot.goods_name}</a></p>
						<p class="price">￥{$goods_hot.price}</p>
					</li>
</volist>
				</ul>
				
				<ul class="products">
<volist name="goods_coup" id="goods_coup">
					<li>
						<p class="pic"><a href="__APP__/item/{$goods_coup.goods_id}.html" target="_blank"><img src="__APP__/{$goods_coup.m_pic}" alt="{$goods_coup.goods_name}"/></a></p>
						<p class="name"><a href="__APP__/item/{$goods_coup.goods_id}.html" target="_blank">{$goods_coup.goods_name}</a></p>
						<p class="price">￥{$goods_coup.price}</p>
					</li>
</volist>
				</ul>

				<ul class="products">
<volist name="goods_new" id="goods_new">
					<li>
						<p class="pic"><a href="__APP__/item/{$goods_new.goods_id}.html" target="_blank"><img src="__APP__/{$goods_new.m_pic}" alt="{$goods_new.goods_name}"/></a></p>
						<p class="name"><a href="__APP__/item/{$goods_new.goods_id}.html" target="_blank">{$goods_new.goods_name}</a></p>
						<p class="price">￥{$goods_new.price}</p>
					</li>
</volist>
				</ul>
				
				<ul class="products">
<volist name="goods_rec" id="goods_rec">
					<li>
						<p class="pic"><a href="__APP__/item/{$goods_rec.goods_id}.html" target="_blank"><img src="__APP__/{$goods_rec.m_pic}" alt="{$goods_rec.goods_name}"/></a></p>
						<p class="name"><a href="__APP__/item/{$goods_rec.goods_id}.html" target="_blank">{$goods_rec.goods_name}</a></p>
						<p class="price">￥{$goods_rec.price}</p>
					</li>
</volist>
				</ul>
				
			</div>
			
			<a href="javascript:void(0);" class="btn-next"></a>
		</div>



   </div>

</div>


<script src="__APP__/statics/webox/webox.js"></script>
<link href="__APP__/statics/webox/jquery-webox.css" rel="stylesheet" type="text/css">
<script>
$(function(){
     var curent=$("#curent").val();
     $("#status option").each(function(){
        if($(this).val()==curent){
		    $(this).attr("selected",'true');
		}
     })
})
$("[name=status]").change(function(){
   var status=$(this).val();
   window.location.href="__URL__/trade/status/"+status;
})

function viewShip(t){
		$.webox({
			height:280,
			width:500,
			bgvisibel:true,
			title:'订单：'+t+'-配送信息',
			iframe:'__GROUP__/Member/viewShip/?order='+t
		});
}
</script>

<script type="text/javascript">
$(document).ready(function(){
	
	var lb = $("#limit-buy"),
		lb_cur = 1,
		lbp_w = lb.find(".products").width();
		lb_timer = null;
	t = 1;
	function showLimitBuyProducts(){
		if(lb_cur < 1){
			lb_cur = 4;
		} else if(lb_cur > 4){
			lb_cur = 1;
		}
		$("#J-lbcp").html(lb_cur);
		var products = $("#limit-buy .products").hide().eq(lb_cur-1).show(),
			ta = products.find("textarea");
			
		if(ta.length){
			products.html(ta.val());
		}
	}
	lb_timer = setInterval(function(){
		lb_cur++;
		showLimitBuyProducts();
	}, 4000);
	
	$("#J-lbn .prev, #J-lb .btn-prev").click(function(){
		lb_cur--;
		showLimitBuyProducts();
	});
	$("#J-lbn .next, #J-lb .btn-next").click(function(){
		lb_cur++;
		showLimitBuyProducts();
	});
	$("#J-lb").hover(function(){
			clearInterval(lb_timer);
			lb_timer = null;
			$("#J-lb .btn-prev, #J-lb .btn-next").show();
		}, function(){
			lb_timer = setInterval(function(){
				lb_cur++;
				showLimitBuyProducts();
			}, 10000);
			$("#J-lb .btn-prev, #J-lb .btn-next").hide();
	});
	
});
</script> 
<div style="clear:both"></div>
<br>
<include file="Public:footersmall"/>